﻿using SageKing.Cache.Features;
using SageKing.Database.Features;
using SageKing.UI.SKAvaloniaUI.Services;
using SukiUI.Dialogs;
using SukiUI.Toasts;

namespace SageKing.UI.SKAvaloniaUI.Features;

[DependsOn(typeof(SageKingCacheFeature))]
[DependsOn(typeof(SageKingDatabaseFeature))]
public class SKAvaloniaUIFeature : FeatureBase
{
    public SKAvaloniaUIFeature(IModule module) : base(module)
    {
         
    }

    /// <summary>
    /// AntDesignOptions
    /// </summary>
    public Action<SKAvaloniaUIOptions> AntDesignServiceConfiguration { get; set; } = _ => { };

    /// <inheritdoc />
    public override void Apply()
    {
        Services.Configure(AntDesignServiceConfiguration);

        //add AddSingleton
        Services.AddSingleton<PageNavigationService>();
        Services.AddSingleton<ClipboardService>();
        Services.AddSingleton<ISukiToastManager, SukiToastManager>();
        Services.AddSingleton<ISukiDialogManager, SukiDialogManager>();
    }
}
